import "@/common/useUtils";
import "@/gcfx_web/style/gcfx.less";
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs";
import { App as AntdApp, ConfigProvider } from "antd";
import zhCN from "antd/locale/zh_CN";
import "dayjs/locale/zh-cn";
import ReactDOM from "react-dom/client";
import { HashRouter } from "react-router-dom";
import App from "./App";
import "./common/polyfill";
import "./common/useAxios";
import "./index.less";
import GlobalContainer from "./store";
import theme from "./theme";
import "./vite-env.d";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
  <GlobalContainer>
    <HashRouter>
      <ConfigProvider locale={zhCN} theme={theme}>
        <StyleProvider hashPriority="high" transformers={[legacyLogicalPropertiesTransformer]}>
          <AntdApp className="size100">
            <App />
          </AntdApp>
        </StyleProvider>
      </ConfigProvider>
    </HashRouter>
  </GlobalContainer>
);
